#include "BoundingBox.h"

CBoundingBox::CBoundingBox()
{
	_maxPt = D3DXVECTOR3(0.0f,0.0f,0.0f);
	_minPt = D3DXVECTOR3(0.0f,0.0f,0.0f);
}

CBoundingBox::~CBoundingBox()
{

}

void CBoundingBox::SetBounding(D3DXVECTOR3 *min, D3DXVECTOR3 *max)
{
	_maxPt = *max;
	_minPt = *min;
}

bool CBoundingBox::IsPtInBounding(D3DXVECTOR3* pt)
{
	if( ( pt->x > _minPt.x) && ( pt->y > _minPt.y) && ( pt->z > _minPt.z) &&
		( pt->x < _maxPt.x) && ( pt->y < _maxPt.y) && ( pt->z < _maxPt.z))
	{
		return true;
	}

	return false;
}